package com.ericsson.common.quartz.job;

import com.ericsson.common.quartz.task.ManualTask;
import org.quartz.Job;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

/**
 * @description:
 * @author: wangjingshi
 * @create: 2020-12-07 09:39
 */
public class ManualQuartzJob implements Job {

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        //执行任务
        JobDataMap dataMap = jobExecutionContext.getJobDetail().getJobDataMap();
        ManualTask quartzTask = (ManualTask)dataMap.get("manualTask");
        // 调用接口函数
        quartzTask.execute();
    }
}
